<%@ Page Language="C#" MasterPageFile="~/Common/WebSiteMaster.master" AutoEventWireup="true" CodeBehind="A_Inheritance.aspx.cs" Inherits="ScottCateAjax2008.Lesson07.A_Inheritance" Title="Class Inheritance" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:ScriptManager id="SC1" ScriptMode="Debug" runat="server">
        <Scripts>
            <asp:ScriptReference Path="A_Inheritance.aspx.js" />
        </Scripts>
    </asp:ScriptManager>
    
    <a href="#ClearSpeedResults" onClick="ClearSpeed()">Clear Speed Results</a><br /><br />

    <h3>Sample 1</h3>
    
    <a href="#AutomobileSpeed" onClick="WriteMaxSpeed(new ScottCate.Automobile('White'))">
        What is the Max Speed of an Automobile</a><br />

    <a href="#CorvetteSpeed" onClick="WriteMaxSpeed(new ScottCate.Corvette('Red'))">
        What is the Max Speed of a Corvette</a><br />

    <a href="#FerrariSpeed" onClick="WriteMaxSpeed(new ScottCate.Ferrari('Yellow'))">
        What is the Max Speed of a Ferrari</a><br />

    <a href="#CheapCarSpeed" onClick="WriteMaxSpeed(new ScottCate.CheapCar('Prime or Rusted'))">
        What is the Max Speed of a Cheap Car </a><br />

    <a href="#DumptruckSpeed" onClick="WriteMaxSpeed(new ScottCate.Dumptruck('Dirty'))">
        What is the Max Speed of a Dump Truck </a><br />

    <a href="#MotorcycleSpeed" onClick="WriteMaxSpeed(new ScottCate.Motorcycle('Chrome'))">
        What is the Max Speed of a Motorcylce </a><br />

    <a href="#SpeedBikeSpeed" onClick="WriteMaxSpeed(new ScottCate.SpeedBike('Chrome'))">
        What is the Max Speed of a SpeedBike </a><br />
        
    <hr />
    <h3>Sample 2 - Prove the lack of JavaScript encapsulation</h3>

    <a href="#CreateFastSportsCar" onClick="CreateFastSportsCar()">
        Show the expected behavior of a valid new Sports Car</a><br />

    <a href="#ShowSportsCarSpeedError" onClick="ShowSportsCarSpeedError()">
        Show the expected behavior of Sports Car Validation (Error expected)</a><br />
        
    <a href="#ProveNoEncapsulation" onClick="ProveNoEncapsulation()">
        Break the rules of Sports Car</a>

    
    <div id="speedResults" style="margin-top:30px">&nbsp;</div>

</asp:Content>









